package com.yuerenjf.yuerenjinfu.widget;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Build;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.TextView;


/**
 * Created by Administrator on 2017/6/15 0015.
 */

public class DinTextView extends TextView {
    public DinTextView(Context context) {
        super(context);
    }

    public DinTextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        Typeface textFont1 = Typeface.createFromAsset(context.getAssets(), "fonts/din.otf");
        setTypeface(textFont1,Typeface.BOLD);
    }

    public DinTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public DinTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        Typeface textFont1 = Typeface.createFromAsset(context.getAssets(), "fonts/din.otf");
        setTypeface(textFont1,Typeface.BOLD);
    }
}
